/**********************************************************
 *
 * 键盘方向键、删除键、复制、粘贴键等事件处理函数
 *
 * *********************************************************/
import { useEditorStore } from 'stores/editorStore';

export function useUndo () {
  // store
  const canvasStore = useEditorStore();

  // undo
  const canvasUndo = () => {
    canvasStore.undo();
  };

  // redo
  const canvasRedo = () => {
    canvasStore.redo();
  };

  return {
    canvasUndo,
    canvasRedo
  };
}
